package com.xintai.sparepart.purchase.service.impl;


import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xintai.sparepart.purchase.mapper.BeiPurchaseFileMapper;
import com.xintai.sparepart.purchase.domain.BeiPurchaseFile;
import com.xintai.sparepart.purchase.service.IBeiPurchaseFileService;

/**
 * 合同上传文件Service业务层处理
 *
 * @author xintai
 * @date 2021-02-21
 */
@Service
public class BeiPurchaseFileServiceImpl implements IBeiPurchaseFileService
{
    @Autowired
    private BeiPurchaseFileMapper beiPurchaseFileMapper;

    /**
     * 查询合同上传文件
     *
     * @param beiId 合同上传文件ID
     * @return 合同上传文件
     */
    @Override
    public BeiPurchaseFile selectBeiPurchaseFileById(Long beiId)
    {
        return beiPurchaseFileMapper.selectBeiPurchaseFileById(beiId);
    }

    /**
     * 查询合同上传文件列表
     *
     * @param beiPurchaseFile 合同上传文件
     * @return 合同上传文件
     */
    @Override
    public List<BeiPurchaseFile> selectBeiPurchaseFileList(BeiPurchaseFile beiPurchaseFile)
    {
        return beiPurchaseFileMapper.selectBeiPurchaseFileList(beiPurchaseFile);
    }

    /**
     * 新增合同上传文件
     *
     * @param beiPurchaseFile 合同上传文件
     * @return 结果
     */
    @Override
    public int insertBeiPurchaseFile(BeiPurchaseFile beiPurchaseFile)
    {
        return beiPurchaseFileMapper.insertBeiPurchaseFile(beiPurchaseFile);
    }

    /**
     * 修改合同上传文件
     *
     * @param beiPurchaseFile 合同上传文件
     * @return 结果
     */
    @Override
    public int updateBeiPurchaseFile(BeiPurchaseFile beiPurchaseFile)
    {
        return beiPurchaseFileMapper.updateBeiPurchaseFile(beiPurchaseFile);
    }

    /**
     * 批量删除合同上传文件
     *
     * @param beiIds 需要删除的合同上传文件ID
     * @return 结果
     */
    @Override
    public int deleteBeiPurchaseFileByIds(Long[] beiIds)
    {
        return beiPurchaseFileMapper.deleteBeiPurchaseFileByIds(beiIds);
    }

    /**
     * 删除合同上传文件信息
     *
     * @param beiId 合同上传文件ID
     * @return 结果
     */
    @Override
    public int deleteBeiPurchaseFileById(Long beiId)
    {
        return beiPurchaseFileMapper.deleteBeiPurchaseFileById(beiId);
    }
}
